package entjava.poker.model;

public class Player {

	private String name;
	private String id;	//player's unique session id
	private int money;		
	private boolean smallBlind;
	private boolean bigBlind;
	private boolean amDealer;
	private Hand hand;
	private int bet;	
	private boolean hasCheck;	//game rounds ends when all players has checked
	private boolean amBroke;	//has no money to bet already
	private boolean hasFolded;	   //when player folds, his no longer active
	private boolean winner;
	private String combination;
	private boolean hasCombination;
	private int comboValue = 0; //one pair=1, two pair =2, three of a kind =3, straight=4, flush=5, full house =6, four of a kind=7, Straight flush=8 
	
	public Player(){		
	}
	
	public Player(String name_, String id_){
		this.name=name_;
		this.id=id_;
		this.money=1000;
		this.bet=0;
		this.amDealer=false;
		this.bigBlind=false;
		this.smallBlind=false;
		this.hand= new Hand();
		this.hasCheck=false;
		this.winner=false;
		this.comboValue=0;
		this.hasCombination=false;
	}
	
	public void putSmallBet(){
		this.money=money-10;
		this.bet =10;
	}
	
	public void putBigBet(){
		this.money=money-20;
		this.bet=20;
	}
	
	public int getComboValue() {
		return comboValue;
	}

	public void setComboValue(int comboValue) {
		this.comboValue = comboValue;
	}

	
	public boolean isHasCombination() {
		return hasCombination;
	}

	public void setHasCombination(boolean hasCombination) {
		this.hasCombination = hasCombination;
	}

	public String getCombination() {
		return combination;
	}

	public void setCombination(String combination) {
		this.combination = combination;
	}

	public void win(int pot) {
	        money += pot;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public boolean isSmallBlind() {
		return smallBlind;
	}

	public void setSmallBlind(boolean smallBlind) {
		this.smallBlind = smallBlind;
	}

	public boolean isBigBlind() {
		return bigBlind;
	}

	public void setBigBlind(boolean bigBlind) {
		this.bigBlind = bigBlind;
	}

	public boolean isAmDealer() {
		return amDealer;
	}

	public void setAmDealer(boolean amDealer) {
		this.amDealer = amDealer;
	}

	public Hand getHand() {
		return hand;
	}

	public void setHand(Hand hand) {
		this.hand = hand;
	}
	
	public int getBet() {
		return bet;
	}

	public void setBet(int bet) {
		this.bet = bet;
	}

	public boolean isHasCheck() {
		return hasCheck;
	}

	public void setHasCheck(boolean hasCheck) {
		this.hasCheck = hasCheck;
	}

	public boolean isAmBroke() {
		return amBroke;
	}

	public void setAmBroke(boolean amBroke) {
		this.amBroke = amBroke;
	}

	public boolean isHasFolded() {
		return hasFolded;
	}

	public void setHasFolded(boolean hasFolded) {
		this.hasFolded = hasFolded;
	}

	public boolean isWinner() {
		return winner;
	}

	public void setWinner(boolean winner) {
		this.winner = winner;
	}
}
